From 0e45eed9c1a08831e9897d73f35713f2d46af67b Mon Sep 17 00:00:00 2001 From: Agustin Martin Date: Thu, 12 Apr 2012 16:19:40 +0200 Subject: [PATCH] textmodes/flyspell.el (flyspell-large-region): Specify encoding for hunspell with ("-i" ENCODING). As done for ispell in in r107799, in flyspell-large-region we also need to specify encoding for hunspell with ("-i" ENCODING), in 2 separate command-line arguments, as expected by hunspell. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/flyspell.el | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 749157c8afc..ca3815b2cc1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-04-12 Agustín Martín Domingo + + * textmodes/flyspell.el (flyspell-large-region): For hunspell, use + '("-i" ENCODING), in 2 separate command-line arguments, to specify + the encoding, as expected by hunspell. + 2012-04-12 Stefan Monnier * battery.el (battery--linux-sysfs-regexp): New const. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 24967ded154..72a3eb474f8 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1576,10 +1576,11 @@ The buffer to mark them in is `flyspell-large-region-buffer'." (if ispell-encoding8-command (setq args (append args - (list - (concat ispell-encoding8-command - (symbol-name - encoding)))))) + (if ispell-really-hunspell + (list ispell-encoding8-command + (upcase (symbol-name encoding))) + (list (concat ispell-encoding8-command + (symbol-name encoding))))))) (let ((process-coding-system-alist (list (cons "\\.*" encoding)))) (setq c (apply 'ispell-call-process-region beg -- 2.30.2